<div class="row">
	<form class="form-inline" method="post" action="?action=add">
		<div class="form-group">
			<label class="sr-only" for="os_name">Tên danh mục</label> 
			<input type="text" class="form-control" id="cat_name" name="cat_name" placeholder="Tên danh mục">
		</div>
		<div class="form-group">
			<label class="sr-only" for="os_status">Trạng thái</label> <select
				class="form-control" id="cat_status" name="cat_status">
				<option value="1">Kích hoạt</option>
				<option value="0">Không kích hoạt</option>

			</select>
		</div>
		<button type="submit" id="add-os-1" class="btn btn-success">Thêm</button>
	</form>
	<div id="message"></div>
</div>
<div class="row">
	<form method="post" action="?action=delete">
		<table class="table">
			<thead>
				<tr>
					<th>#</th>
					<th>Tên ứng dụng</th>
					<th>Icon</th>
					<th>Nhà phát triển</th>
					<th>Ngày tạo</th>
					<th>Trạng thái</th>
					<th>Action</th>
				</tr>
			</thead>
			<tbody id="resultData">
            <?php $i=0; foreach ($this->data as $item ){ ?>
            <tr>
					<td><?php echo $i=$i+1;?></td>
					<td><a href="<?php echo _BASE_URL.'/admin/app/detail?id='.$item['app_id']?>"><?php echo $item['app_name']?></a></td>
					<td><img style="width: 50px" alt="" src="<?php echo _BASE_URL.'/'.$item['app_icon']?>"></td>
					<td><?php echo $item['dev_name']?></td>
					<td><?php $date = new DateTime($item['app_date_create']); echo $date->format('d-m-Y H:s') ?></td>
					<td>
					   <?php echo $item['app_status']?>
					</td>
					<td>
						
						<button type="button" value="<?php echo $item['app_id']?>"
							class="cat_edit">
							<i class="fa fa-pencil"></i>
						</button>
						<button type="submit" value="<?php echo $item['app_id']?>"
							name="cat_id">
							<i class="fa fa-times-circle"></i>
						</button>
					</td>
				</tr>    
            <?php }?>
            
        </tbody>

		</table>
	</form>
</div>